package global

type SysConfig struct {
	Server    *ServerConfig    `mapstructure:"server"`
	Log       *LogConfig       `mapstructure:"log"`
	Mysql     *MysqlConfig     `mapstructure:"mysql"`
	Redis     *RedisConfig     `mapstructure:"redis"`
	Logistics *LogisticsConfig `mapstructure:"logistics"`
	Gpp       *GppConfig       `mapstructure:"gpp"`

	Wx     *WeixinConfig `mapstructure:"weixin"`
	Ali    *AliPayConfig `mapstructure:"ali"`
	Fdd    *FddConfig    `mapstructure:"fdd"`
	Smart  *SmartConfig  `mapstructure:"smart"`
	Export *ExportConfig `mapstructure:"export"`
	Upload *UploadConfig `mapstructure:"upload"`
}

// 服务配置
type ServerConfig struct {
	Name      string `mapstructure:"name"`
	Mode      string `mapstructure:"mode"`
	Port      int    `mapstructure:"port"`
	Lang      string `mapstructure:"lang"`
	PwdSecret string `mapstructure:"pwd_secret"`
}

// mysql配置
type MysqlConfig struct {
	Driver string `mapstructure:"driver"`
	Source string `mapstructure:"source"`
}

// redis配置
type RedisConfig struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Db       int    `mapstructure:"db"`
	Password string `mapstructure:"password"`
}

// 日志配置
type LogConfig struct {
	Level      string `mapstructure:"level"`
	Filename   string `mapstructure:"filename"`
	MaxSize    int    `mapstructure:"maxsize"`
	MaxAge     int    `mapstructure:"max_age"`
	MaxBackups int    `mapstructure:"max_backups"`
}

type CasbinConfig struct {
	ModelPath string `mapstructure:"model_path"`
}

type LogisticsConfig struct {
	AppKey    string `mapstructure:"appKey"`
	AppSecret string `mapstructure:"appSecret"`
	AppCode   string `mapstructure:"appCode"`
	Url       string `mapstructure:"url"`
}

type GppConfig struct {
	Url      string `mapstructure:"url"`
	Account  string `mapstructure:"account"`
	Password string `mapstructure:"password"`
	Vendor   string `mapstructure:"vendor"`
	Product  string `mapstructure:"product"`
}

type AppVersionConfig struct {
	App *AppConfig `mapstructure:"app"`
}

type AppConfig struct {
	Version     string `mapstructure:"version"`
	DownloadUrl string `mapstructure:"download_url"`
	VersionDesc string `mapstructure:"version_desc"`
}

// 微信
type WeixinConfig struct {
	AppId           string `mapstructure:"app_id"`
	AppSecret       string `mapstructure:"app_secret"`
	MchId           string `mapstructure:"mch_id"`
	ApiKey          string `mapstructure:"api_key"`
	ApiKeyV3        string `mapstructure:"api_key_v3"`
	NotifyUrl       string `mapstructure:"notify_url"`
	RefundNotifyUrl string `mapstructure:"refund_notify_url"`
	ServerId        string `mapstructure:"server_id"`
	SerialNo        string `mapstructure:"serial_no"`
	CertPath        string `mapstructure:"cert_path"`
	PayCertPath     string `mapstructure:"pay_cert_path"`
	PayTypeName     string `mapstructure:"pay_type_name"`
	RedirectUri     string `mapstructure:"redirect_uri"`

	NotifiAppId      string `mapstructure:"notifi_app_id"`
	NotifiAppSecret  string `mapstructure:"notifi_app_secret"`

	HotelNotificationsTemplate   string `mapstructure:"hotel_notifications_template"`
	WeChatPublicNotificationsURL string `mapstructure:"wechat_public_notifications_url"`
}

// 阿里
type AliPayConfig struct {
	AccessKey          string `mapstructure:"access_key"`
	AccessKeySecret    string `mapstructure:"access_key_secret"`
	AccessRegionid     string `mapstructure:"access_regionid"`
	AliossEndpoint     string `mapstructure:"alioss_endpoint"`
	AliossBucketName   string `mapstructure:"alioss_bucket_name"`
	AliossUploadImgDir string `mapstructure:"alioss_upload_img_dir"`
	AliossPath         string `mapstructure:"alioss_path"`
	PayTypeName        string `mapstructure:"pay_type_name"`
	PrivateKey         string `mapstructure:"private_key"`
	PublicKey          string `mapstructure:"public_key"`
	AutoPayDay         string `mapstructure:"auto_pay_day"`
	AutoPayPrice       string `mapstructure:"auto_pay_price"`
	ZmServiceId        string `mapstructure:"zm_service_id"`
	ZmCategoryId       string `mapstructure:"zm_category_id"`
	AppCert            string `mapstructure:"app_cert"`
	AliPayRootCert     string `mapstructure:"alipay_root_cert"`
	AliPayPublicCert   string `mapstructure:"alipay_public_cert"`
}

// 法大大
type FddConfig struct {
	FddAppId      string `mapstructure:"fdd_app_id"`
	FddAppSecret  string `mapstructure:"fdd_app_secret"`
	FddNotifyUrl  string `mapstructure:"fdd_notify_url"`
	FddTemplateId string `mapstructure:"fdd_template_id"`
	FddDocTitle   string `mapstructure:"fdd_doc_title"`
	FddUrl        string `mapstructure:"fdd_url"`
}

// 智能对话
type SmartConfig struct {
	SmartManagerId      string `mapstructure:"smart_manager_id"`
	SmartAppId          string `mapstructure:"smart_app_id"`
	SmartToken          string `mapstructure:"smart_token"`
	SmartEncodingAESKey string `mapstructure:"smart_encoding_aes_Key"`
}

// 导出
type ExportConfig struct {
	ExportPath  string `mapstructure:"export_path"`
	ExportExcel string `mapstructure:"export_excel"`
}

// 本地上传
type UploadConfig struct {
	UploadPath          string `mapstructure:"upload_path"`
	UploadHost          string `mapstructure:"upload_host"`
	UploadReqPath       string `mapstructure:"upload_req_path"`
	QrcodeUploadReqPath string `mapstructure:"qrcode_upload_req_path"`
}
